﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using LispInterpretor;

namespace UnitTests
{
    [TestClass]
    public class TestAnd
    {
        [TestMethod]
        public void TestBasicAnd()
        {
            Assert.AreEqual(true, Evaluator.Eval("(and True True)"));
        }

        [TestMethod]
        public void TestFalseAnd()
        {
            Assert.AreEqual(false, Evaluator.Eval("(and False True)"));
        }

        [TestMethod]
        [ExpectedException(typeof(InvalidProgramException))]
        public void TestOneOrMoreParameters()
        {
            Evaluator.Eval("(and True)");
        }
    }
}
